﻿@using viBook.Helpers
@using viBook.Models
@model LogOnModel
@{
    ViewBag.Title = "Log On";
    Layout = "~/Views/Shared/_AccountLayout.cshtml";
    var returnUrl = !Request.QueryString["ReturnUrl"].IsEmpty() ? Request.QueryString["ReturnUrl"] : 
                    (Request.UrlReferrer != null ? Request.UrlReferrer.AbsolutePath : string.Empty);
}
<h2>@ViewBag.Title</h2>
<div id="form-oldschool">
    @using (Html.BeginForm("LogOn", "Account", FormMethod.Post, new { @class = "gen-form with-messages"}))
    {
        <input type="hidden" id="returnUrl" name="returnUrl" value="@returnUrl"/>
        <fieldset>
            <label for="Email">
                Email</label>
            @Html.TextBoxFor(m => m.Email, new { @class = "text-input" })
        </fieldset>
        <fieldset>
            <label for="Password">
                Password @Html.ActionLink("Forgot?", "RequestResetPassword", "Account")</label>
            @Html.PasswordFor(m => m.Password, new { @class = "text-input" })
        </fieldset>
        <fieldset>
            @Html.CheckBoxFor(m => m.RememberMe)
            @Html.LabelFor(m => m.RememberMe)
        </fieldset>
        <input class="button" type="submit" value="Sign In" tabindex="3" />
    }
</div>
<div class="sign-connections">
    @Html.Partial("_OpenIDPartial")
</div>
<p class="sign-notamember">
    Not a member? @Html.ActionLink("Sign up", "Register", "Account")</p>
